import { request } from '@umijs/max';
 
/** 登录 */
export const login = (data: any) => request('/admin/login',{
  method: 'POST',
  data
})
/** 菜单 */
export const promisemenulist = (data: any) => request('/menu/user',{
  method: 'POST',
  data
})
/** 角色列表 */
export const roleList = (data: any) => request('/admin/role/list',{
  method: 'POST',
  data
})
/** 菜单列表 */
export const menulist = (data: any) => request('/admin/menu/menulist',{
  method: 'POST',
  data
})
/** 新增角色 */
export const roleAdd = (data: any) => request('/admin/role/add',{
  method: 'POST',
  data
})
/** 修改角色菜单 */
export const menuChange = (data: any) => request('/admin/role/menu/change',{
  method: 'POST',
  data
})
/** 删除菜单 */
export const menuDel = (data: any) => request('/admin/menu/delete',{
  method: 'POST',
  data
})
/** 更新菜单 */
export const menuUpdate = (data: any) => request('/admin/menu/update',{
  method: 'POST',
  data
})
/** 新增菜单 */
export const menuAdd = (data: any) => request('/admin/menu/add',{
  method: 'POST',
  data
})
/** 用户列表 */
export const userList = (data: any) => request('/admin/user/list',{
  method: 'POST',
  data
})
/** 更新用户状态 */
export const updateStatus = (data: any) => request('/admin/user/update/status',{
  method: 'POST',
  data
})
/** 修改用户角色 */
export const roleChange = (data: any) => request('/admin/role/change',{
  method: 'POST',
  data
})
/** 可用角色列表 */
export const roleEffectlist = (data: any) => request('/admin/role/effectlist',{
  method: 'POST',
  data
})
/** 新增用户 */
export const userCreate = (data: any) => request('/admin/user/create',{
  method: 'POST',
  data
})
/** 重置密码 */
export const updatePwd = (data: any) => request('/admin/user/update/password',{
  method: 'POST',
  data
})
